<!--
 * @Descripttion:
 * @version: 1.0
 * @Author: Teemor
 * @Date: 2024-03-12 16:30:36
-->
<route lang="json5" type="page">
{
  style: { navigationBarTitleText: '登录' },
}
</route>

<template>
  <view class="text-center">
    <view class="p-10">
      <uv-button type="primary" open-type="getPhoneNumber" @getphonenumber="getphonenumber"
        >获取电话号码</uv-button
      >
      <uv-button type="primary" @click="openAuthModal">登录</uv-button>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { useUserStore } from '@/store'
const userStore = useUserStore()
const getphonenumber = (e) => {
  const { code, iv, encryptedData } = e
}

const openAuthModal = () => {
  userStore.setUserInfo({ token: 123123 })
  uni.redirectTo('/pages/index/index')
}
</script>

<style lang="scss" scoped>
//
</style>
